+++ /dev/null
-Description: Fix format errors on 32 bit platforms
- For some reason upstream wants to use %lu on 32 bit platforms and
- the compiler complains that it expects unsigned long. Why upstream
- wants this is not clear, because the variable passed in is Uint32.
-Author: Gert Wollny <gewo@debian.org>
-Debian-Bug: https://bugs.debian.org/865418
-Last-Changed: 2017-09-06
-
---- a/dcmdata/libsrc/dcpath.cc
-+++ b/dcmdata/libsrc/dcpath.cc
-@@ -125,11 +125,7 @@
- }
- else if ( (vr == EVR_item) || (vr == EVR_dataset) )
- {
--#if SIZEOF_LONG == 8
- sprintf(buf, "[%u]", (*it)->m_itemNo);
--#else
-- sprintf(buf, "[%lu]", (*it)->m_itemNo);
--#endif
- pathStr.append(buf);
- it++;
- if (it != endOfList) pathStr.append(".");
-@@ -288,11 +284,7 @@
- result.push_back("[*]");
- else
- {
--#if SIZEOF_LONG == 8
- if (sprintf(buf, "[%u]", itemNo) < 2) return EC_IllegalParameter;
--#else
-- if (sprintf(buf, "[%lu]", itemNo) < 2) return EC_IllegalParameter;
--#endif
- result.push_back(buf);
- }
- nextIsItem = OFFalse;
---- a/dcmdata/libsrc/dcvrul.cc
-+++ b/dcmdata/libsrc/dcvrul.cc
-@@ -334,11 +334,7 @@
- /* get specified value from multi-valued string */
- pos = DcmElement::getValueFromString(stringVal, pos, stringLen, value);
- if (value.empty() ||
--#if SIZEOF_LONG == 8
- (sscanf(value.c_str(), "%u", &field[i]) != 1)
--#else
-- (sscanf(value.c_str(), "%lu", &field[i]) != 1)
--#endif
- )
- {
- errorFlag = EC_CorruptedData;
---- a/dcmsr/libsrc/dsrtcosp.cc
-+++ b/dcmsr/libsrc/dsrtcosp.cc
-@@ -147,11 +147,7 @@
- /* retrieve sample positions from string */
- while (result.good() && (ptr != NULL))
- {
--#if SIZEOF_LONG == 8
- if (sscanf(ptr, "%u", &value) == 1)
--#else
-- if (sscanf(ptr, "%lu", &value) == 1)
--#endif
- {
- addItem(value);
- /* jump to next time offset */
---- a/dcmdata/libsrc/dcvrsl.cc
-+++ b/dcmdata/libsrc/dcvrsl.cc
-@@ -335,11 +335,7 @@
- /* get specified value from multi-valued string */
- pos = DcmElement::getValueFromString(stringVal, pos, stringLen, value);
- if (value.empty() ||
--#if SIZEOF_LONG == 8
- (sscanf(value.c_str(), "%d", &field[i]) != 1)
--#else
-- (sscanf(value.c_str(), "%ld", &field[i]) != 1)
--#endif
- )
- {
- errorFlag = EC_CorruptedData;
---- a/dcmsr/libsrc/dsrimgfr.cc
-+++ b/dcmsr/libsrc/dsrimgfr.cc
-@@ -127,11 +127,7 @@
- {
- if (!tmpString.empty())
- tmpString += '\\';
--#if SIZEOF_LONG == 8
- sprintf(buffer, "%d", *iterator);
--#else
-- sprintf(buffer, "%ld", *iterator);
--#endif
- tmpString += buffer;
- iterator++;
- }
-@@ -158,11 +154,7 @@
- /* retrieve frame values from string */
- while (result.good() && (ptr != NULL))
- {
--#if SIZEOF_LONG == 8
- if (sscanf(ptr, "%d", &value) == 1)
--#else
-- if (sscanf(ptr, "%ld", &value) == 1)
--#endif
- {
- addItem(value);
- /* jump to next frame value */
---- a/dcmdata/libsrc/dcvris.cc
-+++ b/dcmdata/libsrc/dcvris.cc
-@@ -106,11 +106,7 @@
- if (l_error.good())
- {
- /* convert string to integer value */
--#if SIZEOF_LONG == 8
- if (sscanf(str.c_str(), "%d", &sintVal) != 1)
--#else
-- if (sscanf(str.c_str(), "%ld", &sintVal) != 1)
--#endif
- l_error = EC_CorruptedData;
- }
- return l_error;
---- a/dcmimage/libsrc/dicoimg.cc
-+++ b/dcmimage/libsrc/dicoimg.cc
-@@ -574,11 +574,7 @@
- /* set image resolution */
- dataset.putAndInsertUint16(DCM_Columns, Columns);
- dataset.putAndInsertUint16(DCM_Rows, Rows);
--#if SIZEOF_LONG == 8
-- sprintf(numBuf, "%d", NumberOfFrames);
--#else
-- sprintf(numBuf, "%ld", NumberOfFrames);
--#endif
-+ sprintf(numBuf, "%u", NumberOfFrames);
- dataset.putAndInsertString(DCM_NumberOfFrames, numBuf);
- dataset.putAndInsertUint16(DCM_SamplesPerPixel, 3);
- dataset.putAndInsertUint16(DCM_PlanarConfiguration, planarConfig);
---- a/dcmimgle/libsrc/dimoimg.cc
-+++ b/dcmimgle/libsrc/dimoimg.cc
-@@ -2019,11 +2019,7 @@
- /* set image resolution */
- dataset.putAndInsertUint16(DCM_Columns, Columns);
- dataset.putAndInsertUint16(DCM_Rows, Rows);
--#if SIZEOF_LONG == 8
-- sprintf(numBuf, "%d", NumberOfFrames);
--#else
-- sprintf(numBuf, "%ld", NumberOfFrames);
--#endif
-+ sprintf(numBuf, "%u", NumberOfFrames);
- dataset.putAndInsertString(DCM_NumberOfFrames, numBuf);
- dataset.putAndInsertUint16(DCM_SamplesPerPixel, 1);
- /* set pixel encoding and data */